import BuffUtil from '@/BuffUtil';
import UnitSpellEvent from '@/event/UnitSpellEvent';
import Buff from '@/Buff';
export default class Item_紫怨 {
    static id = 'Azyi';
    static 名称: string = '紫怨';
    static 描述: string = '受到沉默并持续受到火焰伤害';
    static 图标: string = 'ReplaceableTextures\\CommandButtons\\BTNStaffOfSilence.blp';
    static buffId: string = 'buff_item_ziyuan';
    static buffType: AppBuffType = {
        id: 'buff_item_ziyuan',
        name: Item_紫怨.名称,
        ubertip: Item_紫怨.描述,
        art: Item_紫怨.图标,
        onInterval: Item_紫怨.buffInterval,
        interval: 0.5,
        isDebuff: true,
        dur: 5,
    };
    static buffInterval(buff: Buff) {
        DamageSystemInstance.applyFireDamage(buff.getParent(), buff.getCaster(), 35);
    }
    static 添加技能(目标: unit) {
        UnitAddAbility(目标, Item_紫怨.id);
    }
    static 释放(x: number, y: number, 来源?: unit, 目标?: unit, d?: any) {
        BuffUtil.addBuff(目标, Item_紫怨.buffId, 来源);
    }
    constructor() {
        BuffUtil.registerBuffType(Item_紫怨.buffType);
        se.onUnitSpellEffect(Item_紫怨.spellEffect, Item_紫怨.id);
    }
    static spellEffect(this: void, d: UnitSpellEvent) {
        Item_紫怨.释放(d.spellTargetX, d.spellTargetY, d.trigUnit, d.spellTargetUnit, d);
    }
}
